static GtkCssValue transparent_black_singleton = (GtkCssValue) { >K_CSS_VALUE_RGBA, 1, { 0, 0, 0, 0 }};
static GtkCssValue transparent_white_singleton = (GtkCssValue) { >K_CSS_VALUE_RGBA, 1, { 1, 1, 1, 0 }};
+static GtkCssValue opaque_white_singleton = (GtkCssValue) { >K_CSS_VALUE_RGBA, 1, { 1, 1, 1, 1 }};
GtkCssValue *
_gtk_css_rgba_value_new_from_rgba (const GdkRGBA *rgba)
rgba->blue == 0)
return _gtk_css_value_ref (&transparent_black_singleton);
}
+ else if (gdk_rgba_is_opaque (rgba))
+ {
+ if (rgba->red == 1 &&
+ rgba->green == 1 &&
+ rgba->blue == 1)
+ return _gtk_css_value_ref (&opaque_white_singleton);
+ }
value = _gtk_css_value_new (GtkCssValue, >K_CSS_VALUE_RGBA);
value->rgba = *rgba;